package org.jet.emall.rbac.transfer;


import org.jet.emall.rbac.dto.AdminLoginLogDTO;
import org.jet.emall.rbac.dto.AdminOpLogDTO;
import org.jet.emall.rbac.po.AdminLoginLog;
import org.jet.emall.rbac.po.AdminOpLog;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author xiaozai
 * @version 1.0
 * @date 2020-04-14 13:42
 */

@Mapper
public interface AdminLogDtoTransfer {

    AdminLogDtoTransfer INSTANCE = Mappers.getMapper(AdminLogDtoTransfer.class);


    /**
     *   将操作日志DTO转成PO
     * @param adminOpLogDTO
     * @return
     */
    AdminOpLog toPo(AdminOpLogDTO adminOpLogDTO);

    /**
     *   将登录日志DTO转成PO
     * @param adminLoginLogDTO
     * @return
     */
    AdminLoginLog toPo(AdminLoginLogDTO adminLoginLogDTO);

    /**
     *   将登录日志PO列表转成DTO列表
     * @param adminLoginLogList
     * @return
     */
    List<AdminLoginLogDTO> toPoList(List<AdminLoginLog> adminLoginLogList);

    /**
     *  将操作日志PO列表转成DTO列表
     * @param adminOpLogList
     * @return
     */
    List<AdminOpLogDTO> toOpPoList(List<AdminOpLog> adminOpLogList);
}
